package com.controller;

import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * name:LoginController
 * date:2021/6/29
 * Author:gxh
 * description:
 * version:
 */
//@RestController
    @Controller
public class LoginController {

    /**
     * 判断用户是否登陆，可以自行修改
     * @param session
     * @return
     */
    @ResponseBody
    @RequestMapping("/getUser")
    public Object getSessionUser(HttpSession session){
        Object user = session.getAttribute("isLogin");
        return user;
    }
}

